import {Pipe, PipeTransform} from "@angular/core";
/**
 * Created by Administrator on 2017/3/28.
 */
@Pipe({name: 'fillPlanTaskType'})
export class FillPlanTaskType implements PipeTransform {
    transform(value: any): string {
        let result: string = "-";
        switch (value) {
            case 'unfill':
                result = '<span class="label label-warning">未填报</span>';
                break;
            case 'uncheck':
                result = '<span class="label label-info">需人工审核</span>';
                break;
            case 'passcheck':
                result = '<span class="label label-success">审核通过</span>';
                break;
            case 'failcheck':
                result = '<span class="label label-warning">审核不通过</span>';
                break;
            default:
                result = '<span class="label label-danger">未知</span>';
                break;
        }

        return result
    }


    types: any = [
        {name: "未填报", value: 0},
        {name: "需人工审核", value: 1},
        {name: "审核通过", value: 2},
        {name: "审核不通过", value: 3},
    ]


    getTypes(): any {
        return this.types
    }
}